package ee.ut.math.tvt.mitupead.domain.data;

import ee.ut.math.tvt.mitupead.ui.model.PurchaseInfoTableModel;
import ee.ut.math.tvt.mitupead.ui.panels.PurchaseItemPanel;

import java.util.Calendar;
import java.util.GregorianCalendar;


public class HistoryItem implements Cloneable, DisplayableItem{

    private Long id;
    private String date;
    private String time;
    private String sum;
    private PurchaseInfoTableModel tabel;
    
  
    
    public HistoryItem(PurchaseInfoTableModel purchaseInfoTableModel, String sum) {
        this.setTabel(purchaseInfoTableModel);
        this.setSum(sum);
        Calendar c = Calendar.getInstance();
		String[] aeg = c.getTime().toLocaleString().split(" ");
        this.date = aeg[0];
        this.time = aeg[1];
       
    }
    
    
    


    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }


        public String getDate() {
                return date;
        }


        public void setDate(String date) {
                this.date = date;
        }


        public String getTime() {
                return time;
        }


        public void setTime(String time) {
                this.time = time;
        }


        public String getSum() {
                return sum;
        }


        public void setSum(String sum) {
                this.sum = sum;
        }


        public PurchaseInfoTableModel getTabel() {
                return tabel;
        }


        public void setTabel(PurchaseInfoTableModel tabel) {
                this.tabel = tabel;
        }





		@Override
		public String getName() {
			// TODO Auto-generated method stub
			return null;
		}
}